<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <link rel="stylesheet" href="../../css/animate.css">
  <link rel="stylesheet" href="../../iconfont/iconfont.css">
  <link rel="stylesheet" href="../../css/mescroll.css">
  <link rel="stylesheet" href="../../css/gloab.css">
  <title>积分交易记录</title>
  <style>
    .form-son-input{
      line-height: 1rem;
      font-size:0.28rem;
    }
    .mescroll{
        position:fixed;
        top: 0;
        bottom: 0;
        height: auto;
        left:0;
        right:0;
    }
  </style>
</head>
<body>
  <div id="app">
    <div id="public-header" style="">
      <div id="statusbar"></div>
      <header class="public-header">
        <div class="public-header-lf iconfont icon-fanhui" @click="javascript:api.closeWin();"></div>
        <div class="public-header-title">积分交易记录</div>
      </header>
    </div>
    <div id="mescroll" class="mescroll">
      <div>
    <div class="zijinmx-body" style="" v-if="rechargedata&&rechargedata.length>0">
      <!-- 充值 -->
      <div class="zijinmx-body-cz flex" v-for="(item,index) in rechargedata">
          <div class="zijinmx-body-cz-lf F1"><img src="../../image/personal/icon4.png" alt=""></div>
          <div class="zijinmx-body-cz-ct F4">
            <p>{{item.content}}</p>
            <span>{{item.createtime}}</span>
          </div>
          <div class="zijinmx-body-cz-rt F2">
            <p>￥{{item.payprice}}</p>
            <span style="color:#000;">积分余额:{{item.integral}}</span>
          </div>
          <!-- <div class="zijinmx-body-cz-rt F2">￥{{item.payprice}}</div> -->
      </div>
    </div>
  </div>
</div>
    <div v-else class="none-order">
      <span>暂无数据</span>
    </div>
  </div>
  <div class="public-progress" style="z-index:9;">
    <img src="../../icon/icon150x150.png" alt="" class="animated infinite flash" style="width:200px;height:200px;display:block;margin:200px auto;">
  </div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/jquery.js"></script>
<script src="../../script/mescroll.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/jsencrypt.js"></script>
<script src="../../script/fastclick.js"></script>

<script>
var vm;
var mescroll;
apiready=function(){
  api.removeLaunchView();
  setBar("statusbar");
  setFont(750);
  startVue();
  NewMescroll();
  var top=$("#public-header").outerHeight(true);
  $("#mescroll").css({"top":top+"px"});
  $(".public-progress").fadeOut(1000);
  setTimeout(function(){
    $(".public-progress").css({"display":"none"});
  },2000);
}
function startVue(){
  vm = new Vue({
    el:"#app",
    data:{
      gdtt:['100','1000','5000','10000','20000','50000'],
      num:3,
      rechargedata:[],
      type:'',
      page:0,
    },
    created:function(){
        // this.chongzhi();
    },
    methods:{
      more:function(obj){
        if(obj.num){
          vm.page++;
        }else{
          vm.page=0;
          mescroll.lockUpScroll(false);
        }
        vm.chongzhi();
      },
      chongzhi:function(){
        api.ajax({
            url: apiUrl+'/api/Allmoney/jifen',
            method: 'post',
            data: {
                values: {
                  uid: post_en($api.getStorage('uid')),
                  type:4,
                  page:vm.page,
                },
            }
        },function(ret, err){
            if (ret.status) {
                vm.rechargedata=ret.data;
            } else {
              if(vm.page!=0){
                msg("我也是有底线的！");
              }else{
                vm.rechargedata = '';
                msg("暂无数据");
              }
              mescroll.lockUpScroll(true);
            }
            mescroll.endUpScroll(false);
            mescroll.endSuccess();
        });
      },
    }
  })
}
function NewMescroll(){
  mescroll = new MeScroll("mescroll", {
      down:{
        use:true,
        auto:true,
        // autoShowLoading:true,
        callback:vm.more, //下拉刷新的回调,别写成downCallback(),多了括号就自动执行方法了
      },
      up:{
        use:true,
        auto:false,
        loadFull:{ //自动加载下一页体验，前提是第一页的数据没有占满整个屏幕
          use : false,
          delay : 500
        },
        lazyLoad: {
          use: true, // 是否开启懒加载,默认false
          attr: 'imgurl', // 网络地址的属性名 (图片加载成功会移除该属性): <img imgurl='网络图  src='占位图''/>
          showClass: 'mescroll-lazy-in', // 图片加载成功的显示动画: 渐变显示,参见mescroll.css
          delay: 500, // 列表滚动的过程中每500ms检查一次图片是否在可视区域,如果在可视区域则加载图片
          offset: 200 // 超出可视区域200px的图片仍可触发懒加载,目的是提前加载部分图片
        },
        callback:vm.more, //上拉刷新的回调,别写成downCallback(),多了括号就自动执行方法了
      }
    })
}
</script>
</html>
